package com.etung.iot.demo.storage;

import com.etung.iot.demo.modles.RealData;
import com.etung.iot.demo.storage.constorage.TriggerConditionStoreRule;
import com.etung.iot.demo.utils.SpringContextUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Storage(StorageConstant.NO_STORAGE)
public class NoStoreRule implements StorageHandler {
    @Autowired
    private ConStorageSelector conStorageSelector;
//    private ConStorageSelector conStorageSelector = SpringContextUtils.getBean(ConStorageSelector.class);


    @Override
    public void handler(RealData realData) {
        //不存储，直接丢弃
        //判断是否触发了条件存储
        conStorageSelector.saveConditionRealData(realData);
    }
}
